﻿@{
    ViewBag.Title = "Add or Update Menu";
}
@using Helper

<script src="@Url.ContentArea("~/Content/javascript/menu.js")" type="text/javascript"></script>
@Html.Action("_AddOrUpdate", "MenuManagement", new { id = Model })

<script type="text/javascript">
    ///Document Ready jQuery
    $(document).ready(function () {

        $('#fileupload').fileupload({
            dataType: 'json',
            url: '/Administrator/MenuManagement/UploadFiles?dir=Menu',
            autoUpload: true,
            done: function (e, data) {
                $('#image').html('<img width=\"70px\" height=\"70px\" src="/Media/Menu/' + data.result.name + '" />');

            }
        }).on('fileuploadprogressall', function (e, data) {
            var progress = parseInt(data.loaded / data.total * 100, 10);
            $('.progress .progress-bar').css('width', progress + '%');
        });

    });
</script>